package com.audaque.springboot.foshanupload.web.webdemo.mapper;

import com.audaque.springboot.foshanupload.web.webdemo.mapper.covert.BooleanStrCoverter;
import com.audaque.springboot.foshanupload.web.webdemo.model.domain.UserTest;
import com.audaque.springboot.foshanupload.web.webdemo.model.dto.UserTestDTO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.ReportingPolicy;
import org.springframework.stereotype.Component;

@Component
@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE,uses={BooleanStrCoverter.class})
public interface UserMapper {
    @Mappings({
            @Mapping(source = "gender",target = "sex"),
    })
    UserTestDTO toUserTestDTO(UserTest userTest);
}


